//
//  XCMyLocalPlayDownLoadTableViewCell.m
//  SoundOfNature
//
//  Created by 梁新昌 on 16/3/12.
//  Copyright © 2016年 梁新昌. All rights reserved.
//

#import "XCMyLocalPlayDownLoadTableViewCell.h"

@implementation XCMyLocalPlayDownLoadTableViewCell

- (void)dealloc {
    [_localButton release];
//    [_recentPlayButton release];
//    [_MVDownLoadButton release];
    [_musicDownLoadButton release];
    
    [_localMusicImageView release];
    [_musicDownLoadImageView release];
//    [_MVDownLoadImageView release];
//    [_recentPlayImageView release];
    
//    [_recentPlayLable release];
    [_localMusicLable release];
    [_musicDownLoadLable release];
//    [_MVDownLoadLable release];
    
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        self.localMusicImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        
        self.localMusicImageView.image = [[UIImage imageNamed:@"Image-local"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        self.localMusicImageView.contentMode = UIViewContentModeRedraw;
        
        self.localMusicImageView.userInteractionEnabled = YES;
        self.musicDownLoadImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        self.musicDownLoadImageView.userInteractionEnabled = YES;
        self.musicDownLoadImageView.image = [[UIImage imageNamed:@"Image-musicDownLoad"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        self.musicDownLoadImageView.contentMode = UIViewContentModeRedraw;
//        self.MVDownLoadImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
//        self.MVDownLoadImageView.userInteractionEnabled = YES;
        
//        self.MVDownLoadImageView.image = [[UIImage imageNamed:@"Image-musicDownLoad"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//        self.MVDownLoadImageView.contentMode = UIViewContentModeRedraw;
        
        
//        self.recentPlayImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
//        self.recentPlayImageView.userInteractionEnabled = YES;
        
//        self.recentPlayImageView.image = [[UIImage imageNamed:@"Image-local"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//        self.recentPlayImageView.contentMode = UIViewContentModeRedraw;
        
        self.localMusicLable = [[XCBaseLable alloc] initWithFrame:CGRectZero];
        self.localMusicLable.text = @"我的专题";
        self.localMusicLable.userInteractionEnabled = YES;
        self.musicDownLoadLable = [[XCBaseLable alloc]initWithFrame:CGRectZero];
        self.musicDownLoadLable.text = @"最近播放";
        self.musicDownLoadLable.userInteractionEnabled = YES;
//        self.MVDownLoadLable = [[XCBaseLable alloc] initWithFrame:CGRectZero];
//        self.MVDownLoadLable.text = @"MV下载";
//        self.MVDownLoadLable.userInteractionEnabled = YES;
//        self.recentPlayLable = [[XCBaseLable alloc] initWithFrame:CGRectZero];
//        self.recentPlayLable.text = @"最近播放";
//        self.recentPlayLable.userInteractionEnabled = YES;
        
        self.localButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.musicDownLoadButton = [UIButton buttonWithType:UIButtonTypeSystem];
//        self.MVDownLoadButton = [UIButton buttonWithType:UIButtonTypeSystem];
//        self.recentPlayButton = [UIButton buttonWithType:UIButtonTypeSystem];
    
        
        [self.contentView addSubview:self.localMusicImageView];
        [self.contentView addSubview:self.localMusicLable];
        [self.contentView addSubview:self.musicDownLoadImageView];
        [self.contentView addSubview:self.musicDownLoadLable];
        
//        [self.contentView addSubview:self.recentPlayImageView];
//        [self.contentView addSubview:self.recentPlayLable];
        
//        [self.contentView addSubview:self.MVDownLoadImageView];
//        [self.contentView addSubview:self.MVDownLoadLable];
        
        [self.contentView addSubview:self.localButton];
//        [self.contentView addSubview:self.MVDownLoadButton];
        [self.contentView addSubview:self.musicDownLoadButton];
//        [self.contentView addSubview:self.recentPlayButton];
        
        [_localMusicImageView release];
        [_localMusicLable release];
        
//        [_MVDownLoadImageView release];
//        [_MVDownLoadLable release];
        
//        [_recentPlayImageView release];
//        [_recentPlayLable release];
        
        [_musicDownLoadImageView release];
        [_musicDownLoadLable release];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
//    本地
    self.localMusicImageView.frame = CGRectMake(20, 10, (self.bounds.size.width - 60) / 2  , self.bounds.size.height - 20);
//    self.localMusicImageView.backgroundColor = [UIColor yellowColor];
    self.localMusicLable.frame = CGRectMake(self.localMusicImageView.frame.origin.x + 20, self.localMusicImageView.frame.origin.y + 20, self.localMusicImageView.frame.size.width - 20, self.localMusicImageView.frame.size.height - 20);
    self.localMusicLable.textColor = [UIColor whiteColor];
    self.localButton.frame = self.localMusicImageView.frame;

////     mv 下载
//    self.MVDownLoadImageView.frame = CGRectMake(20, 40 + (self.bounds.size.height - 60) / 2 , (self.bounds.size.width - 60) / 2, (self.bounds.size.height - 60) / 2);
////    self.MVDownLoadImageView.backgroundColor = [UIColor greenColor];
//    self.MVDownLoadLable.frame = CGRectMake(self.MVDownLoadImageView.frame.origin.x + 20, self.MVDownLoadImageView.frame.origin.y + 20, self.MVDownLoadImageView.frame.size.width - 20, self.MVDownLoadImageView.frame.size.height - 20);
//    self.MVDownLoadLable.textColor = [UIColor whiteColor];
//    self.MVDownLoadButton.frame = self.MVDownLoadImageView.frame;
    
//    歌曲下载
    self.musicDownLoadImageView.frame = CGRectMake(40 + (self.bounds.size.width - 60) / 2, 10, (self.bounds.size.width - 60 ) / 2 , self.bounds.size.height - 20);
//    self.musicDownLoadImageView.backgroundColor = [UIColor blueColor];
    self.musicDownLoadLable.frame = CGRectMake(self.musicDownLoadImageView.frame.origin.x + 20, self.musicDownLoadImageView.frame.origin.y + 20, self.musicDownLoadImageView.frame.size.width - 20, self.musicDownLoadImageView.frame.size.height - 20);
    self.musicDownLoadLable.textColor = [UIColor whiteColor];
    self.musicDownLoadButton.frame = self.musicDownLoadImageView.frame;
////    最近播放
//    self.recentPlayImageView.frame = CGRectMake(40 + (self.bounds.size.width - 60) / 2, 40 + (self.bounds.size.height - 60) / 2, (self.bounds.size.width - 60) / 2 , (self.bounds.size.height - 60) / 2);
////    self.recentPlayImageView.backgroundColor = [UIColor orangeColor];
//    self.recentPlayLable.frame = CGRectMake(self.recentPlayImageView.frame.origin.x + 20, self.recentPlayImageView.frame.origin.y + 20, self.recentPlayImageView.frame.size.width - 20, self.recentPlayImageView.frame.size.height - 20);
//    self.recentPlayLable.textColor = [UIColor whiteColor];
//    self.recentPlayButton.frame = self.recentPlayImageView.frame;
    
}
- (void)awakeFromNib {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
